package fr.upmc.i3s.upmcontact.contents;

import java.util.Date;

public class LostFoundObject extends Submitted {
	
	private static final long serialVersionUID = -3784490462741494577L;
	
	private String name;
	private int type;
	private int status;
	
	public LostFoundObject() {
		super();
		this.name = null;
		this.type = -1;
		this.status = -1;
	}
	
	public LostFoundObject(String id, Date createdAt, Date updatedAt, 
							String description, String place, String photoPath, User signaledBy, 
							  String name, int type, int status) {
		super(id, createdAt, updatedAt, description, place, photoPath, signaledBy);
		this.name = name;
		this.type = type;
		this.status = status;
	}

	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public int getType() {
		return type;
	}
	public void setType(int type) {
		this.type = type;
	}
	public int getStatus() {
		return status;
	}
	public void setStatus(int status) {
		this.status = status;
	}

	@Override
	public int hashCode() {
		return super.hashCode();
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (!super.equals(obj))
			return false;
		if (getClass() != obj.getClass())
			return false;
		LostFoundObject other = (LostFoundObject) obj;
		if (name == null) {
			if (other.name != null)
				return false;
		} else if (!name.equals(other.name))
			return false;
		if (status != other.status)
			return false;
		if (type != other.type)
			return false;
		return true;
	}

	@Override
	public String toString() {
		return super.toString() + " LostFoundObject [name=" + name + ", type=" + type + ", status="
				+ status + "]";
	}
	
}
